package cn.maiyar.swagger;

import cn.maiyar.swagger.entity.Authorization;
import cn.maiyar.swagger.entity.Contact;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Swagger 自定义参数配置
 *
 * @author c.c
 */
@Setter
@Getter
@ConfigurationProperties("meta.swagger")
public class SwaggerProperties {
    // 是否启用Swagger
    private boolean enable;
    // 解析的包路径
    private List<String> basePackages = new ArrayList<>(Collections.singletonList("cn.maiyar"));
    // 解析的url规则
    private List<String> basePath = new ArrayList<>();
    // 在basePath基础上需要排除的url规则
    private List<String> excludePath = new ArrayList<>();
    // 接口标题
    private String title = "接口文档系统";
    // 服务器名称
    private String serviceName = "default";
    // 接口描述
    private String description = "接口文档系统";
    // 当前接口文档版本
    private String version = "v1.0.0";
    // 接口许可证
    private String license = "";
    // 许可证URL
    private String licenseUrl = "";
    // 服务条款
    private String termsOfServiceUrl = "";
    // host信息
    private String host = "127.0.0.1";
    // 联系人信息
    private Contact contact = new Contact();
    // 全局统一鉴权配置
    private Authorization authorization = new Authorization();
}
